package work20241221;

/**
 * @author zdl
 * @date 2024/12/21
 */
class MyThread extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 1000; i++) {
            System.out.println("MyThread------------>" + i);
        }
    }
}
public class Demo1 {
    public static void main(String[] args) {
        MyThread myThread = new MyThread();
        myThread.start();
        //-------------------main线程-------------------
        for (int i = 0; i < 1000; i++) {
            System.out.println("main------------>" + i);
        }
    }
}
